﻿using System;
using Web.Class;

namespace Web.Pages.YongShui._13.LAIHANGL
{
    public partial class FenHuDJ : BasePage
    {
        #region 属性
        
        #endregion

        #region 变量
        
        #endregion

        #region 事件
        
        
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                InitControl();
                ClearSession();
            }
            UCLHFenHuDJXX.SetControlStatus(3, UCLHFenHuDJXX.YongHu3Checked);
            
        }

        protected void BtnShuiBiao_Click(object sender, EventArgs e)
        {
            int type = 0;
            string msg = "";
            UCLHFenHuDJXX.CheckYongHuHIsUsed(out type, out msg);
            if (type > 0)
            {
                PageTools.AlertMsg(this, msg);
            }
            else
            {
                string sl = "";
                if (UCLHFenHuDJXX.LaiHanLCBHZT != "" && Convert.ToInt32(UCLHFenHuDJXX.LaiHanLCBHZT) > 0)
                {
                    sl = "&sl=1";
                }
                string script = "OpenShuiBiaoXX('{0}','{1}','{2}','{3}',{4}{5},'{6}');";
                script = string.Format(script, UCLHFenHuDJXX.YongHuHY, UCLHFenHuDJXX.YongHuH1, UCLHFenHuDJXX.YongHuH2, UCLHFenHuDJXX.YongHuH3, UCLHFenHuDJXX.YongHu3Checked == true ? "3" : "0", sl, !string.IsNullOrEmpty(Request["id"])?Request["id"]:"");
                PageTools.ResponseScript(this, script);
            }
        }
        #endregion

        #region 方法
        
       
        private void InitControl()
        {
            UCLHShenQingXX.SetFenHuTxTModel(false);
        }

        
        private void ClearSession()
        {
            Session["DtDataSocure1"] = null;
            Session["DtDataSocure2"] = null;
            Session["DtDataSocure3"] = null;
        }
        
        #endregion
    }
}